"""
	Developerd by Andrea Stagi <stagi.andrea@gmail.com>
	TwittLine - the client twitter on your terminal
	Copyright (C) 2010 Andrea Stagi

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
import os

class colors:
	BLACK = '\033[0;30m'
    	LIGHTBLACK = '\033[1;30m'
	RED = '\033[0;31m'
    	LIGHTRED = '\033[1;31m'
    	GREEN = '\033[0;32m'
    	LIGHTGREEN = '\033[1;32m'
    	YELLOW = '\033[0;33m'
    	LIGHTYELLOW = '\033[1;33m'
    	BLUE = '\033[0;34m'
    	LIGHTBLUE = '\033[1;34m'
	PURPLE = '\033[0;35m'
    	LIGHTPURPLE = '\033[1;35m'
	CYAN = '\033[0;36m'
    	LIGHTCYAN = '\033[1;36m'
	GREY = '\033[0;37m'
    	LIGHTGREY = '\033[1;37m'
	
    	ENDC = '\033[0m'

	v=[BLACK,LIGHTBLACK,RED,LIGHTRED,GREEN,LIGHTGREEN,YELLOW,LIGHTYELLOW,BLUE,LIGHTBLUE,PURPLE,LIGHTPURPLE,CYAN,LIGHTCYAN,GREY,LIGHTGREY]

class palette:
	col=[colors.BLUE,colors.LIGHTBLUE,colors.LIGHTYELLOW]

	def __init__(self,col1,col2,col3):
		self.col[0]=col1
		self.col[1]=col2
		self.col[2]=col3
	
	def setColors(self,col1,col2,col3):
		self.col[0]=col1
		self.col[1]=col2 
		self.col[2]=col3



class paint:
	cl=palette(colors.LIGHTBLUE,colors.BLUE,colors.LIGHTYELLOW)

def colorprint(text,cindex):
	if(os.name=="posix"):
		print paint.cl.col[cindex] + text + colors.ENDC,
	else:
		print text.encode("mbcs"),
def colorprintln(text,cindex):
	if(os.name=="posix"):
		print paint.cl.col[cindex] + text + colors.ENDC
	else:
		print text.encode("mbcs")

